package com.project.web.feign;

import com.project.web.feign.fallback.UserClientFallbackImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "user", fallbackFactory = UserClientFallbackImpl.class)
public interface UserClient {

    /**
     * 根据手机号查询用户
     *
     * @param phone
     * @return
     */
    @PostMapping(value = "/admin/auth/user/getByPhone")
    Map<String, Object> getByPhone(@RequestParam("phone") String phone);
}
